package main

func main() {
	reverseString([]byte{'H','a','l','n','a','h'})
}

func reverseString(s []byte)  {
	if len(s) == 0 {
		return
	}
	index := 0
	left := &s[index]
	right := &s[len(s)-index-1]
	for index < len(s) / 2 {
		*left, *right = *right, *left
		index++
		left = &s[index]
		right = &s[len(s)-index-1]
	}
}
